package top.continew.ai.config;

import cn.hutool.extra.spring.SpringUtil;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanInitializationException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.*;
import org.springframework.stereotype.Component;

/**
 * AiChatUtil:
 *
 * @Author： Lonni
 * @Date： 2025/8/21  17:22
 */

public class AiChatUtil {


    /**
     * 获取简单的client对象
     *
     * @return
     */
    public static ChatClient getSimpleClient() {
        ChatClient.Builder builder = SpringUtil.getBean(ChatClient.Builder.class);

        ChatClient client = builder.build();

        return client;
    }


}
